
{% extends 'ask/i/base.html' %}
{% load filter_tool %}




{% block menu %}

{% endblock %}


{% block content %}
              <div class="cuai" >
                    <h3>{{ current_user.nickname }}的提问</h3>
                    <a href="{{ current_user_url }}/asks" class="cr">更多>></a>
              </div>

			    <div class="ask" >
                    {% for q in questions %}
                         <div class="question" >
                            <h2><a href="/question/{{ q.id }}" >{{ q.question }}</a></h2>
                            <div class="more" >
                                <span>{{ q.answer_count }}个回答</span>
                                
                                {% ifequal q.anonymity 1 %}
                             <span style="margin-left: 15px;" >匿名</span>
                                {% endifequal %}
                                <span style="margin-left: 15px;float:right;padding-top:2px" >{{ q.create_time|date:'Y-m-d  H:i' }}</span>
                            </div>
                        </div>
                    {% endfor %}


                </div>

                <div style="height:50px" ></div>


                  <div class="cuai" >
                        <h3>{{ current_user.nickname }}的回答</h3>
                        <a href="{{ current_user_url }}/answer" class="cr" >更多>></a>
                   </div>

                <div class="ask" >

                {% autoescape off %}

                     {% for q_id,user_id,question,a_id,answer,create_time in answered_questions %}

                            <div class="question" >   
                                <h2><a href="/question/{{ q_id }}#{{ a_id }}" >{{ question }}</a></h2>
                                <span class="ianswer" >TA的回答:</span>
                                <div class="ianswer" style="margin-top: 5px;color:#111;line-height: 22px;" >
                                    {{ answer|cutwords:40}}
                                </div>
                                <div class="ianswertime" >
                                    <span>{{ create_time|date:'Y-m-d H:i' }}</span>
                                </div>
                            </div>
                    {% endfor %}
                {% endautoescape %}


                </div>


                <div style="height:50px" ></div>


                  <div class="cuai" >
                        <h3>问TA的问题</h3>
                        <a href="{{ current_user_url }}/answer" class="cr" >更多>></a>
                   </div>

                <div class="ask" >

                {% autoescape off %}

                     {% for q_id,user_id,question,a_id,answer,create_time in answered_questions %}

                            <div class="question" >   
                                <h2><a href="/question/{{ q_id }}#{{ a_id }}" >{{ question }}</a></h2>
                                <span class="ianswer" >TA的回答:</span>
                                <div class="ianswer" style="margin-top: 5px;color:#111;line-height: 22px;" >
                                    {{ answer }}
                                </div>
                                <div class="ianswertime" >
                                    <span>{{ create_time|date:'Y-m-d H:i' }}</span>
                                </div>
                            </div>
                    {% endfor %}
                {% endautoescape %}


                </div>
            
{% endblock %}

